﻿package com.xy.model;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Cacheable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/*
 * @操作（用户）表
 */
@SuppressWarnings("serial")
@Entity
@Table
@Cacheable
public class Admin extends Identified implements Serializable {
  @Column(nullable = false)
  private String account;// 账号
  @Column(nullable = false)
  private String pwd;// 密码
  @Column(nullable = false)
  private String phone;// 电话
  @Column(nullable = false)
  private String name;// 姓名
  @Column(nullable = false)
  private String position;// 职位
  @Column(nullable = false)
  private String role;// 角色
  private String remark;// 备注
  // 对应学生领书
  @OneToMany(targetEntity = DeliverToStudent.class, mappedBy = "admin") // 学生领书
  private Set<DeliverToStudent> deliverToStudents = new HashSet<DeliverToStudent>();
  // 对应其他人领书
  @OneToMany(targetEntity = DeliverToOther.class, mappedBy = "admin") // 其他领书
  private Set<DeliverToOther> deliverToOthers = new HashSet<DeliverToOther>();
  // 对应函授站领书
  @OneToMany(targetEntity = DeliverToStation.class, mappedBy = "admin") // 函授站领书
  private Set<DeliverToStation> deliverToStations = new HashSet<DeliverToStation>();
  // 对应教师领书
  @OneToMany(targetEntity = DeliverToTeacher.class, mappedBy = "admin") // 教师领书
  private Set<DeliverToTeacher> deliverToTeachers = new HashSet<DeliverToTeacher>();
  // 对应入库管理
  @OneToMany(targetEntity = StockReceive.class, mappedBy = "admin") //
  private Set<StockReceive> stockReceives = new HashSet<StockReceive>();
  // 对应入库报销
  @OneToMany(targetEntity = PayMent.class, mappedBy = "admin") //
  private Set<PayMent> payMents = new HashSet<PayMent>();
  // 对应库存盘点
  @OneToMany(targetEntity = StockCheck.class, mappedBy = "admin") //
  private Set<StockCheck> stockChecks = new HashSet<StockCheck>();
  // 对应移库管理
  @OneToMany(targetEntity = StockMove.class, mappedBy = "admin") //
  private Set<StockMove> stockMoves = new HashSet<StockMove>();

  public Admin() {
    super();
    // TODO Auto-generated constructor stub
  }

  public String getAccount() {
    return account;
  }

  public void setAccount(String account) {
    this.account = account;
  }

  public String getPwd() {
    return pwd;
  }

  public void setPwd(String pwd) {
    this.pwd = pwd;
  }

  public String getPhone() {
    return phone;
  }

  public void setPhone(String phone) {
    this.phone = phone;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getPosition() {
    return position;
  }

  public void setPosition(String position) {
    this.position = position;
  }

  public String getRole() {
    return role;
  }

  public void setRole(String role) {
    this.role = role;
  }

  public String getRemark() {
    return remark;
  }

  public void setRemark(String remark) {
    this.remark = remark;
  }

  public Set<DeliverToStudent> getDeliverToStudents() {
    return deliverToStudents;
  }

  public void setDeliverToStudents(Set<DeliverToStudent> deliverToStudents) {
    this.deliverToStudents = deliverToStudents;
  }

  public Set<DeliverToOther> getDeliverToOthers() {
    return deliverToOthers;
  }

  public void setDeliverToOthers(Set<DeliverToOther> deliverToOthers) {
    this.deliverToOthers = deliverToOthers;
  }

  public Set<DeliverToStation> getDeliverToStations() {
    return deliverToStations;
  }

  public void setDeliverToStations(Set<DeliverToStation> deliverToStations) {
    this.deliverToStations = deliverToStations;
  }

  public Set<DeliverToTeacher> getDeliverToTeachers() {
    return deliverToTeachers;
  }

  public void setDeliverToTeachers(Set<DeliverToTeacher> deliverToTeachers) {
    this.deliverToTeachers = deliverToTeachers;
  }

  public Set<StockReceive> getStockReceives() {
    return stockReceives;
  }

  public void setStockReceives(Set<StockReceive> stockReceives) {
    this.stockReceives = stockReceives;
  }

  public Set<PayMent> getPayMents() {
    return payMents;
  }

  public void setPayMents(Set<PayMent> payMents) {
    this.payMents = payMents;
  }

  public Set<StockCheck> getStockChecks() {
    return stockChecks;
  }

  public void setStockChecks(Set<StockCheck> stockChecks) {
    this.stockChecks = stockChecks;
  }

  public Set<StockMove> getStockMoves() {
    return stockMoves;
  }

  public void setStockMoves(Set<StockMove> stockMoves) {
    this.stockMoves = stockMoves;
  }

}
